<%-- 
    Document   : q175
    Created on : Jul 6, 2012, 11:18:25 AM
    Author     : ems
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.fancybox-1.3.4.pack.js"></script>
        <!-- -->
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/kapi.js"></script>
        <link rel="stylesheet" type="text/css" href="../css/permissionUser.css"/>

    </head>
    <style type="text/css">
                #main{
            width: 100%;
            
        }
        #content{
            width: 98%;
            padding: 0;
            margin-left: 1%;
        }
        #footer{
            width: 100%;
        }
        .sort_char label{
            cursor:pointer;
            padding:0px 4px;
            font-weight: normal  !important;
            text-transform: uppercase;
        }
        .active-search{
            color:yellow !important;
            font-weight: normal  !important;
            
        }
        .checkbox{
            float: right;
            margin-right: 20px;
            margin-top: 1px;
        }
        .group{
            font-weight:bold;
        }
        .fast_search
        {
            margin-left: 300px;
            margin-top:0px!important;
            position: absolute;
        }
        .comment-content{
            margin-top:50px!important;            
        }
         
        .child .sourceItem, .child .destinationItem {
            background: url("../images/bullet_blue.png") no-repeat scroll 40px 40% transparent ;
            height: 20px;
            padding-left: 50px;
            padding-top: 5px;
            width: 860px;
        }
        #sourceDiv .group, #destinationDiv .group {
            background: url("../images/plus.png") no-repeat scroll 25px 50% transparent;
            border-bottom: 1px solid #CCCCCC;
            cursor: pointer;
            min-height: 20px;
            padding-left: 45px;
            padding-right: 2px;
            padding-top: 3px;
            text-align: left;
        }

    </style>
    <script type="text/javascript" language="javascript">
        $j = jQuery.noConflict();
        $j(document).ready(function(){
            $j('.keysearch').live('keyup',function(){
                if($j('.keysearch').val() == ""){
                    $j('.contact').show();
                                   
                }else{
                    $j('.contact').hide();
                    $j('.contact').each(function(){
                        html = $j(this).html();
                        if(   ununicode(html).indexOf(  ununicode($j('.keysearch').val()) ) > -1    )  {
                            $j(this).show();
                        }else{
                            $j(this).hide();
                        }
                    });
                }

            });
            
            
            
            $j('.contact-content').live ('click', function(){
                object = $j(this).next();

                if(!object.hasClass("contact-active")){
                    $j.post("adminq175descriptionhtml.jsp?pn100="+$j(this).attr('lang'),function(data){

                        object.html(data);
                        object.addClass("contact-active");
                        object.slideToggle()

                    });
                }else{
                    object.slideToggle() ;
                    object.removeClass("contact-active");
                }

            });
            $j('.checkbox').live ('click', function(){
                //alert($j(this).is(':checked')  + $j(this).attr('lang'));
                showPleaseWait();
                value = 0;
                if($j(this).is(':checked')){
                    value = 1;
                }
                $j.post("adminq175action.jsp?id="+$j(this).attr('lang')+"&value="+value,function(data){

                    hidePleaseWait();

                });
            });

        });
        function expand(obj){
            $j(obj).next().slideToggle('slow');
        }
    </script>
    <body>
        <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
        <h:outputText value="<div class='permission' lang='#{loginSession.right.MENU_ADM_VIEW}'></div>" escape="false"/>
        <f:view>
            <a4j:form>

                <div id="content">
                    <div id="menu_top">
                        <div class="dropdown">
                            <div class="select_choise">
                                <a href="#"><span><h:outputText value="Khu vực"/></span></a>
                            </div>
                            <div class="select_hidden">
                                <ul>
                                    <li><a href="#"><span>Filter Cấp 3</span></a></li>
                                    <li><a href="#"><span>Filter Cấp 3</span></a></li>
                                    <li><a href="#"><span>Filter Cấp 3</span></a></li>
                                </ul>
                            </div>
                        </div>
                        <div class="dropdown">
                            <div class="select_choise">
                                <a href="#"><span>Outlets</span></a>
                            </div>
                            <div class="select_hidden">
                                <ul>
                                    <li><a href="#"><span>Ban Điều Hành</span></a></li>
                                    <li><a href="#"><span>Nhóm IT</span></a></li>
                                    <li><a href="#"><span>Filter Cấp 3</span></a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div id="content_detail">
                        <div class="content">
                            <div class="contact" style="background:white">
                                <%-- Khach Hang --%>
                                <div class="fast_search">
                                    <h:inputText value="" onfocus="if(this.value=='')this.value='';" styleClass="keysearch"/>
                                    <div  style="margin-left:5px; float:left" class="buttonsearch"> </div>                  
                                </div>  
                                <div class="list_content comment-content">


                                    <div class="header" > <div class="sort_char" style="margin-left:5px;"><label><h:outputText value="Quyền cá nhân"/></label></div>
                                        <%--    <div class="sort_char" style="margin-left:5px;"> <jsp:include page="../../common/search.jsp"/> </div>--%>
                                    </div> 
                                    <div class="header-item">

                                        <a4j:repeat value="#{q175Controller.allListN100}" var="item">
                                            <div class="contact" >

                                                <div class="contact-content" lang="<h:outputText value="#{item.pn100} "/>">
                                                    <div class="content-personal">
                                                        <div class="items_n550 " style="cursor:pointer; width: 100%;">

                                                            <span><h:outputText value="#{item.nv101} #{item.nv127} #{item.nv102}"/></span>
                                                        </div>

                                                    </div>
                                                </div>
                                                <div class="permission-description"  id="destinationDiv" style="float:left;height:auto;width:100%;display:none; background:white;"></div>

                                            </div>
                                        </a4j:repeat>
                                    </div>
                                </div>

                            </div>
                        </div>

                    </div>
                </div>
                <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                 height="30" width="40" zindex="2000">
                    <h:outputText value="#{locale.please_wait}" styleClass="startDummer"></h:outputText>
                </rich:modalPanel>
                <h:inputHidden id="flag" value="#{q175Controller.flag}" />
            </a4j:form>
        </f:view>

    </body>
</html>
